<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>New Book</title>
    </h:head>
    <h:body>
        <h:form>
            <h1>Add a Book</h1>
            <h:panelGrid id="inputPanel" columns="2">
                <h:outputLabel for="title" value="Title: "/>
                <h:inputText id="title" value="#{bookUIModel.book.title}"/>
                <h:outputLabel for="author" value="Author: "/>
                <h:inputText id="author" value="#{bookUIModel.book.author}"/>
                <h:outputLabel for="isbn" value="ISBN: "/>
                <h:inputText id="isbn" value="#{bookUIModel.book.isbn}"/>
                <h:outputLabel for="price" value="Price: "/>
                <h:inputText id="price" value="#{bookUIModel.book.price}"/>
            </h:panelGrid>
            <h:panelGrid id="actionPanel" columns="2">
                <h:commandButton value="Add Book" action="#{bookUIModel.addBook()}"/>
                <h:button value="Home" outcome="../index.xhtml"/>
            </h:panelGrid>
        </h:form>
    </h:body>
</html>

